package Entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author 277
 * @since 2025-09-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("voucher")
@HeadRowHeight(20)//设置表头行高
@ContentRowHeight(20)///设置内容行行高
public class Voucher implements Serializable {

    private static final long serialVersionUID = 1L;
    @ExcelProperty(value = "代金券id", index = 0)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ColumnWidth(20)
    @ExcelProperty(value = "创建时间", index = 4)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ColumnWidth(20)
    @ExcelProperty(value = "结束时间", index = 5)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime endTime;

    @ExcelProperty(value = "代金券名字", index = 1)
    private String voucherName;
    @ExcelProperty(value = "金额", index = 2)
    private BigDecimal voucherMoney;

    @ExcelProperty(value = "库存", index = 3)
    private Integer voucherStock;

    @ExcelProperty(value = "使用范围", index = 4)
    private Integer arryRange;

    @ExcelProperty(value = "对应商品", index = 5)
    private Integer shopId;


}
